<template>
  <view class="detail">
    <view class="detail_list">
      <view class="detail_list_item" v-for="item, indexs in list" :key="indexs">
        <view class="detail_list_time">{{ item.createTime }}</view>
        <view class="detail_list_content" v-for="items, j in item.pointOrderList" :key="j">
          <view>
            <view> 积分提现 </view>
            <view class="hui">{{ items.createTime }}</view>
          </view>
          <view class="bold">{{ items.number }}分点</view>
        </view>
      </view>
    </view>
  </view>
</template>
<script setup lang="ts">
import { reactive, ref } from 'vue';
import { setApiData } from '@/hooks'
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
const { setApi } = setApiData()
onLoad(() => {
  // Listfn()
})
const page = reactive({
  pageNumber: 1,
  pageSize: 10,
  total: 0
})
const list = ref<any>([])
const Listfn = (async () => {
  const result = await setApi({
    name: 'orderList',
    param: [{ pageNumber: page.pageNumber, pageSize: page.pageSize }]
  })
  if (result.code == 200) {
    page.total = result.data.total
    list.value = [...list.value, result.data.rows][0]
  }
})
onReachBottom(() => {
  uni.$emit("showLoading", true);
  if (list.value.length >= page.total) {
    uni.$emit("showLoading", false);
    return;
  } else {
    page.pageNumber++
    Listfn()
  }
})
</script>
<style scoped lang="scss">
@import './moenyDetial.scss'
</style>